package com.lovejes.app.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the t_jes_vote_groupitem table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="t_jes_vote_groupitem"
 */

public abstract class BaseTJesVoteGroupitem  implements Serializable {

	public static String REF = "TJesVoteGroupitem";
	public static String PROP_GROUPID = "Groupid";
	public static String PROP_ID = "Id";
	public static String PROP_ITEMNAME = "Itemname";
	public static String PROP_IDX = "Idx";


	// constructors
	public BaseTJesVoteGroupitem () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseTJesVoteGroupitem (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String groupid;
	private java.lang.String itemname;
	private java.lang.Integer idx;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="uuid"
     *  column="ID"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: GROUPID
	 */
	public java.lang.String getGroupid () {
		return groupid;
	}

	/**
	 * Set the value related to the column: GROUPID
	 * @param groupid the GROUPID value
	 */
	public void setGroupid (java.lang.String groupid) {
		this.groupid = groupid;
	}



	/**
	 * Return the value associated with the column: ITEMNAME
	 */
	public java.lang.String getItemname () {
		return itemname;
	}

	/**
	 * Set the value related to the column: ITEMNAME
	 * @param itemname the ITEMNAME value
	 */
	public void setItemname (java.lang.String itemname) {
		this.itemname = itemname;
	}



	/**
	 * Return the value associated with the column: IDX
	 */
	public java.lang.Integer getIdx () {
		return idx;
	}

	/**
	 * Set the value related to the column: IDX
	 * @param idx the IDX value
	 */
	public void setIdx (java.lang.Integer idx) {
		this.idx = idx;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.lovejes.app.domain.TJesVoteGroupitem)) return false;
		else {
			com.lovejes.app.domain.TJesVoteGroupitem tJesVoteGroupitem = (com.lovejes.app.domain.TJesVoteGroupitem) obj;
			if (null == this.getId() || null == tJesVoteGroupitem.getId()) return false;
			else return (this.getId().equals(tJesVoteGroupitem.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}